<?php namespace App\Filters;

use App\Traits\FilterHelpers;
use EloquentFilter\ModelFilter;

class MenuFilter extends ModelFilter
{
    use FilterHelpers;
    /**
     * Related Models that have ModelFilters as well as the method on the ModelFilter
     * As [relationMethod => [input_key1, input_key2]].
     *
     * @var array
     */
    public $relations = [];

    /**
     * @param int $count
     */
    public function root($count = 6)
    {
        $this->where('menu_id', '=', 0)->take($count);
    }

}
